package com.bsoft.gol.hcs.specialist.entity;

import javax.persistence.*;
import java.util.Date;

/**
 * @author hekr22831
 * @description
 * @date 2022/5/25.21:01
 */
@Entity(name = "FollowUpPathRoute")
@Table(name = "follow_up_path_route")
public class FollowUpPathRouteEntity {
    /**
     * 院后随访Id
     */
    private long fusPathRouteId;
    /**
     * 随访路径主键
     */
    private Long routeId;
    /**
     * 随访路径名称
     */
    private String routeName;
    /**
     * 租户id
     */
    private String tenantId;
    /**
     * 机构代码
     */
    private String organizationId;
    /**
     * 随访设置随访类型:0不需要随访、1需要随访
     */
    private Byte followUpType;
    /**
     * 备注
     */
    private String comment;
    /**
     * 类别 1,门诊2住院
     */
    private Byte source;
    /**
     * 住院号或门诊就诊序号
     */
    private String visitNo;
    /**
     * 创建时间
     */
    private Date createDt;
    /**
     * 修改时间
     */
    private Date modifiedDt;
    /**
     * 状态 0 未生成随访计划 1 已生成随访计划
     */
    private String status;

    @Id
    @Column(name = "fus_path_route_id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public long getFusPathRouteId() {
        return fusPathRouteId;
    }

    public void setFusPathRouteId(long fusPathRouteId) {
        this.fusPathRouteId = fusPathRouteId;
    }

    @Basic
    @Column(name = "tenant_id")
    public String getTenantId() {
        return tenantId;
    }

    public void setTenantId(String tenantId) {
        this.tenantId = tenantId;
    }

    @Basic
    @Column(name = "organization_id")
    public String getOrganizationId() {
        return organizationId;
    }

    public void setOrganizationId(String organizationId) {
        this.organizationId = organizationId;
    }

    @Basic
    @Column(name = "route_id")
    public Long getRouteId() {
        return routeId;
    }

    public void setRouteId(Long routeId) {
        this.routeId = routeId;
    }

    @Basic
    @Column(name = "route_name")
    public String getRouteName() {
        return routeName;
    }

    public void setRouteName(String routeName) {
        this.routeName = routeName;
    }

    @Basic
    @Column(name = "follow_up_type")
    public Byte getFollowUpType() {
        return followUpType;
    }

    public void setFollowUpType(Byte followUpType) {
        this.followUpType = followUpType;
    }

    @Basic
    @Column(name = "comment")
    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    @Basic
    @Column(name = "visit_no")
    public String getVisitNo() {
        return visitNo;
    }

    public void setVisitNo(String visitNo) {
        this.visitNo = visitNo;
    }

    @Basic
    @Column(name = "source")
    public Byte getSource() {
        return source;
    }

    public void setSource(Byte source) {
        this.source = source;
    }

    @Basic
    @Column(name = "create_dt")
    public Date getCreateDt() {
        return createDt;
    }

    public void setCreateDt(Date createDt) {
        this.createDt = createDt;
    }

    @Basic
    @Column(name = "modified_dt")
    public Date getModifiedDt() {
        return modifiedDt;
    }

    public void setModifiedDt(Date modifiedDt) {
        this.modifiedDt = modifiedDt;
    }

    @Basic
    @Column(name = "status" )
    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof FollowUpPathRouteEntity)) return false;

        FollowUpPathRouteEntity that = (FollowUpPathRouteEntity) o;

        if (fusPathRouteId != that.fusPathRouteId) return false;
        if (routeId != null ? !routeId.equals(that.routeId) : that.routeId != null) return false;
        if (routeName != null ? !routeName.equals(that.routeName) : that.routeName != null) return false;
        if (tenantId != null ? !tenantId.equals(that.tenantId) : that.tenantId != null) return false;
        if (organizationId != null ? !organizationId.equals(that.organizationId) : that.organizationId != null)
            return false;
        if (followUpType != null ? !followUpType.equals(that.followUpType) : that.followUpType != null) return false;
        if (comment != null ? !comment.equals(that.comment) : that.comment != null) return false;
        if (source != null ? !source.equals(that.source) : that.source != null) return false;
        if (visitNo != null ? !visitNo.equals(that.visitNo) : that.visitNo != null) return false;
        if (createDt != null ? !createDt.equals(that.createDt) : that.createDt != null) return false;
        if (status != null ? !status.equals(that.status) : that.status != null) return false;
        return modifiedDt != null ? modifiedDt.equals(that.modifiedDt) : that.modifiedDt == null;
    }

    @Override
    public int hashCode() {
        int result = (int) (fusPathRouteId ^ (fusPathRouteId >>> 32));
        result = 31 * result + (routeId != null ? routeId.hashCode() : 0);
        result = 31 * result + (routeName != null ? routeName.hashCode() : 0);
        result = 31 * result + (tenantId != null ? tenantId.hashCode() : 0);
        result = 31 * result + (organizationId != null ? organizationId.hashCode() : 0);
        result = 31 * result + (followUpType != null ? followUpType.hashCode() : 0);
        result = 31 * result + (comment != null ? comment.hashCode() : 0);
        result = 31 * result + (source != null ? source.hashCode() : 0);
        result = 31 * result + (visitNo != null ? visitNo.hashCode() : 0);
        result = 31 * result + (createDt != null ? createDt.hashCode() : 0);
        result = 31 * result + (modifiedDt != null ? modifiedDt.hashCode() : 0);
        result = 31 * result + (status != null ? status.hashCode() : 0);
        return result;
    }
}
